<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>tf::cudaUSMAllocator class | Taskflow QuickStart</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
  <link rel="icon" href="favicon.ico" type="image/x-icon" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="theme-color" content="#22272e" />
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
        <a href="https://taskflow.github.io"><img src="taskflow_logo.png" alt="" />Taskflow</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">QuickStart</a>
      </span>
      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
          <path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
        </svg></a>
        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
      </div>
      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
        <div class="m-row">
          <ol class="m-col-t-6 m-col-m-none">
            <li><a href="pages.html">Handbook</a></li>
            <li><a href="namespaces.html">Namespaces</a></li>
          </ol>
          <ol class="m-col-t-6 m-col-m-none" start="3">
            <li><a href="annotated.html">Classes</a></li>
            <li><a href="files.html">Files</a></li>
            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
              <use href="#m-doc-search-icon-path" />
            </svg></a></li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <h1>
          <div class="m-doc-template">template&lt;typename T&gt;</div>
          <span class="m-breadcrumb"><a href="namespacetf.html">tf</a>::<wbr/></span>cudaUSMAllocator <span class="m-thin">class</span>
        </h1>
        <p>class to create a unified shared memory (USM) allocator</p>
        <table class="m-table m-fullwidth m-flat">
          <thead>
            <tr><th colspan="2">Template parameters</th></tr>
          </thead>
          <tbody>
            <tr>
              <td style="width: 1%">T</td>
              <td>element type</td>
            </tr>
          </tbody>
        </table>
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#pub-types">Public types</a></li>
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                <li><a href="#pub-methods">Public functions</a></li>
              </ul>
            </li>
          </ul>
        </nav>
<p>A cudaUSMAllocator enables using unified shared memory (USM) allocation for standard library containers. It is typically passed as template parameter when declaring standard library containers (e.g. <a href="http://en.cppreference.com/w/cpp/container/vector.html" class="m-doc-external">std::<wbr />vector</a>).</p>
        <section id="pub-types">
          <h2><a href="#pub-types">Public types</a></h2>
          <dl class="m-doc">
            <dt>
              <div class="m-doc-template">template&lt;typename U&gt;</div>
              struct <a href="structtf_1_1cudaUSMAllocator_1_1rebind.html" class="m-doc">rebind</a>
            </dt>
            <dd>its member type <code>U</code> is the equivalent allocator type to allocate elements of type U</dd>
            <dt id="a4ab981d38c36112b589a3b67c510fc50">
              using <a href="#a4ab981d38c36112b589a3b67c510fc50" class="m-doc-self">value_type</a> = T
            </dt>
            <dd>element type</dd>
            <dt id="a580e704508e250311f4dce9c6413d900">
              using <a href="#a580e704508e250311f4dce9c6413d900" class="m-doc-self">pointer</a> = T*
            </dt>
            <dd>element pointer type</dd>
            <dt id="ae700ece72b4eeb0f13f612455878f0a9">
              using <a href="#ae700ece72b4eeb0f13f612455878f0a9" class="m-doc-self">reference</a> = T&amp;
            </dt>
            <dd>element reference type</dd>
            <dt id="a1bbd56f975fd433c1fd86d5008373ad0">
              using <a href="#a1bbd56f975fd433c1fd86d5008373ad0" class="m-doc-self">const_pointer</a> = const T*
            </dt>
            <dd>const element pointer type</dd>
            <dt id="af5b1bd492a8de28eb75c136ee391b006">
              using <a href="#af5b1bd492a8de28eb75c136ee391b006" class="m-doc-self">const_reference</a> = const T&amp;
            </dt>
            <dd>constant element reference type</dd>
            <dt id="a2d145987f7535219dcfe47ee6765b2ad">
              using <a href="#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc-self">size_type</a> = <a href="http://en.cppreference.com/w/cpp/types/size_t.html" class="m-doc-external">std::<wbr />size_t</a>
            </dt>
            <dd>size type</dd>
            <dt id="aae5fff6eb8fd2e61f686d6e3ccb9ba9d">
              using <a href="#aae5fff6eb8fd2e61f686d6e3ccb9ba9d" class="m-doc-self">difference_type</a> = <a href="http://en.cppreference.com/w/cpp/types/ptrdiff_t.html" class="m-doc-external">std::<wbr />ptrdiff_t</a>
            </dt>
            <dd>pointer difference type</dd>
          </dl>
        </section>
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            <dt id="a10c30e951b3dab81261c26e91b0ec62b">
              <span class="m-doc-wrap-bumper"><a href="#a10c30e951b3dab81261c26e91b0ec62b" class="m-doc-self">cudaUSMAllocator</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Constructs a device allocator object.</dd>
            <dt id="a8b881c3608e2886513c0364e9fdc417f">
              <span class="m-doc-wrap-bumper"><a href="#a8b881c3608e2886513c0364e9fdc417f" class="m-doc-self">cudaUSMAllocator</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&amp;) <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Constructs a device allocator object from another device allocator object.</dd>
            <dt id="a19981496b14b5a29cc2f71dfc25eecd1">
              <div class="m-doc-template">template&lt;typename U&gt;</div>
              <span class="m-doc-wrap-bumper"><a href="#a19981496b14b5a29cc2f71dfc25eecd1" class="m-doc-self">cudaUSMAllocator</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&lt;U&gt;&amp;) <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Constructs a device allocator object from another device allocator object with a different element type.</dd>
            <dt id="a8bfebfc64bc7781856870f143a84f03b">
              <span class="m-doc-wrap-bumper"><a href="#a8bfebfc64bc7781856870f143a84f03b" class="m-doc-self">~cudaUSMAllocator</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Destructs the device allocator object.</dd>
          </dl>
        </section>
        <section id="pub-methods">
          <h2><a href="#pub-methods">Public functions</a></h2>
          <dl class="m-doc">
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a174d32365a682da21469e155b95d3260" class="m-doc">address</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#ae700ece72b4eeb0f13f612455878f0a9" class="m-doc">reference</a> x) -&gt; <a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a></span>
            </dt>
            <dd>Returns the address of x.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#ae9e99ab1ec08d419798e50f8d5b49802" class="m-doc">address</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#af5b1bd492a8de28eb75c136ee391b006" class="m-doc">const_<wbr />reference</a> x) const -&gt; <a href="classtf_1_1cudaUSMAllocator.html#a1bbd56f975fd433c1fd86d5008373ad0" class="m-doc">const_<wbr />pointer</a></span>
            </dt>
            <dd>Returns the address of x.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#afa664496a897fc04442a5fc1988b8759" class="m-doc">allocate</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a> n,
              const void* = 0) -&gt; <a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a></span>
            </dt>
            <dd>allocates block of storage.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a0ec189c941b389062106a37fde46677a" class="m-doc">deallocate</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr,
              <a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a>)</span>
            </dt>
            <dd>Releases a block of storage previously allocated with member allocate and not yet released.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#abdf3c2024de5972e7d13d15d4960c984" class="m-doc">max_size</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>returns the maximum number of elements that could potentially be allocated by this allocator</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a9218d72dc90bc87b1ac648f5bf923439" class="m-doc">construct</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr,
              <a href="classtf_1_1cudaUSMAllocator.html#af5b1bd492a8de28eb75c136ee391b006" class="m-doc">const_<wbr />reference</a> val)</span>
            </dt>
            <dd>Constructs an element object on the location pointed by ptr.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a33ea798011c837c65251b756ae3d66f9" class="m-doc">destroy</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr)</span>
            </dt>
            <dd>destroys in-place the object pointed by <code>ptr</code></dd>
            <dt>
              <div class="m-doc-template">template&lt;typename U&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#aea7c8c9232f588faaf274c4439ca936d" class="m-doc">operator==</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&lt;U&gt;&amp;) const -&gt; bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>compares two allocator of different types using <code>==</code></dd>
            <dt>
              <div class="m-doc-template">template&lt;typename U&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#abf8b566b8863b5a460e816a5f3d5fd7b" class="m-doc">operator!=</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&lt;U&gt;&amp;) const -&gt; bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>compares two allocator of different types using <code>!=</code></dd>
          </dl>
        </section>
        <section>
          <h2>Function documentation</h2>
          <section class="m-doc-details" id="a174d32365a682da21469e155b95d3260"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a174d32365a682da21469e155b95d3260" class="m-doc-self">address</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#ae700ece72b4eeb0f13f612455878f0a9" class="m-doc">reference</a> x)</span></span>
            </h3>
            <p>Returns the address of x.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">x</td>
                  <td>reference to an object</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>a pointer to the object</td>
                </tr>
              </tfoot>
            </table>
<p>This effectively means returning &amp;x.</p>
          </div></section>
          <section class="m-doc-details" id="ae9e99ab1ec08d419798e50f8d5b49802"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classtf_1_1cudaUSMAllocator.html#a1bbd56f975fd433c1fd86d5008373ad0" class="m-doc">const_<wbr />pointer</a> tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ae9e99ab1ec08d419798e50f8d5b49802" class="m-doc-self">address</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#af5b1bd492a8de28eb75c136ee391b006" class="m-doc">const_<wbr />reference</a> x) const</span></span>
            </h3>
            <p>Returns the address of x.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">x</td>
                  <td>reference to an object</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>a pointer to the object</td>
                </tr>
              </tfoot>
            </table>
<p>This effectively means returning &amp;x.</p>
          </div></section>
          <section class="m-doc-details" id="afa664496a897fc04442a5fc1988b8759"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#afa664496a897fc04442a5fc1988b8759" class="m-doc-self">allocate</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a> n,
              const void* = 0)</span></span>
            </h3>
            <p>allocates block of storage.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">n</td>
                  <td>number of elements (each of size sizeof(value_type)) to be allocated</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>a pointer to the initial element in the block of storage.</td>
                </tr>
              </tfoot>
            </table>
<p>Attempts to allocate a block of storage with a size large enough to contain <code>n</code> elements of member type, <code>value_type</code>, and returns a pointer to the first element.</p><p>The storage is aligned appropriately for object of type <code>value_type</code>, but they are not constructed.</p><p>The block of storage is allocated using cudaMalloc and throws <a href="http://en.cppreference.com/w/cpp/memory/new/bad_alloc.html" class="m-doc-external">std::<wbr />bad_alloc</a> if it cannot allocate the total amount of storage requested.</p>
          </div></section>
          <section class="m-doc-details" id="a0ec189c941b389062106a37fde46677a"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper">void tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a0ec189c941b389062106a37fde46677a" class="m-doc-self">deallocate</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr,
              <a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a>)</span></span>
            </h3>
            <p>Releases a block of storage previously allocated with member allocate and not yet released.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">ptr</td>
                  <td>pointer to a block of storage previously allocated with allocate</td>
                </tr>
              </tbody>
            </table>
<p>The elements in the array are not destroyed by a call to this member function.</p>
          </div></section>
          <section class="m-doc-details" id="abdf3c2024de5972e7d13d15d4960c984"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classtf_1_1cudaUSMAllocator.html#a2d145987f7535219dcfe47ee6765b2ad" class="m-doc">size_<wbr />type</a> tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#abdf3c2024de5972e7d13d15d4960c984" class="m-doc-self">max_size</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">noexcept</span></span></span>
            </h3>
            <p>returns the maximum number of elements that could potentially be allocated by this allocator</p>
            <table class="m-table m-fullwidth m-flat">
              <tfoot>
                <tr>
                  <th style="width: 1%">Returns</th>
                  <td>the nubmer of elements that might be allcoated as maximum by a call to member allocate</td>
                </tr>
              </tfoot>
            </table>
<p>A call to member allocate with the value returned by this function can still fail to allocate the requested storage.</p>
          </div></section>
          <section class="m-doc-details" id="a9218d72dc90bc87b1ac648f5bf923439"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper">void tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a9218d72dc90bc87b1ac648f5bf923439" class="m-doc-self">construct</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr,
              <a href="classtf_1_1cudaUSMAllocator.html#af5b1bd492a8de28eb75c136ee391b006" class="m-doc">const_<wbr />reference</a> val)</span></span>
            </h3>
            <p>Constructs an element object on the location pointed by ptr.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">ptr</td>
                  <td>pointer to a location with enough storage soace to contain an element of type <code>value_type</code></td>
                </tr>
                <tr>
                  <td>val</td>
                  <td>value to initialize the constructed element to</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a33ea798011c837c65251b756ae3d66f9"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
              </div>
              <span class="m-doc-wrap-bumper">void tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a33ea798011c837c65251b756ae3d66f9" class="m-doc-self">destroy</a>(</span><span class="m-doc-wrap"><a href="classtf_1_1cudaUSMAllocator.html#a580e704508e250311f4dce9c6413d900" class="m-doc">pointer</a> ptr)</span></span>
            </h3>
            <p>destroys in-place the object pointed by <code>ptr</code></p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">ptr</td>
                  <td>pointer to the object to be destroye</td>
                </tr>
              </tbody>
            </table>
<p>Notice that this does not deallocate the storage for the element but calls its destructor.</p>
          </div></section>
          <section class="m-doc-details" id="aea7c8c9232f588faaf274c4439ca936d"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
                template&lt;typename U&gt;
              </div>
              <span class="m-doc-wrap-bumper">bool tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#aea7c8c9232f588faaf274c4439ca936d" class="m-doc-self">operator==</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&lt;U&gt;&amp;) const <span class="m-label m-success">noexcept</span></span></span>
            </h3>
            <p>compares two allocator of different types using <code>==</code></p>
<p>USM allocators of different types are always equal to each other because the storage allocated by the allocator <code>a1</code> can be deallocated through <code>a2</code>.</p>
          </div></section>
          <section class="m-doc-details" id="abf8b566b8863b5a460e816a5f3d5fd7b"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;typename T&gt;
                template&lt;typename U&gt;
              </div>
              <span class="m-doc-wrap-bumper">bool tf::<wbr />cudaUSMAllocator&lt;T&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#abf8b566b8863b5a460e816a5f3d5fd7b" class="m-doc-self">operator!=</a>(</span><span class="m-doc-wrap">const <a href="classtf_1_1cudaUSMAllocator.html" class="m-doc">cudaUSMAllocator</a>&lt;U&gt;&amp;) const <span class="m-label m-success">noexcept</span></span></span>
            </h3>
            <p>compares two allocator of different types using <code>!=</code></p>
<p>USM allocators of different types are always equal to each other because the storage allocated by the allocator <code>a1</code> can be deallocated through <code>a2</code>.</p>
          </div></section>
        </section>
      </div>
    </div>
  </div>
</article></main>
<div class="m-doc-search" id="search">
  <a href="#!" onclick="return hideSearch()"></a>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-m-8 m-push-m-2">
        <div class="m-doc-search-header m-text m-small">
          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
          <div id="search-symbolcount">&hellip;</div>
        </div>
        <div class="m-doc-search-content">
          <form>
            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
          </form>
          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
          <div id="search-help" class="m-text m-dim m-text-center">
            <p class="m-noindent">Search for symbols, directories, files, pages or
            modules. You can omit any prefix from the symbol or file path; adding a
            <code>:</code> or <code>/</code> suffix lists all members of given symbol or
            directory.</p>
            <p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
            / <span class="m-label m-dim">&uarr;</span> to navigate through the list,
            <span class="m-label m-dim">Enter</span> to go.
            <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
            copy a link to the result using <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">M</span> produces a Markdown link.</p>
          </div>
          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
          <ul id="search-results"></ul>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2024.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.9.6 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
      </div>
    </div>
  </div>
</nav></footer>
</body>
</html>
